package com.design.cjm.behavioral.observer.example;

/**
 * @Author: Jie Ming Chen
 * @Date: 2018/9/24
 * @Version 1.0
 */
public class TestApp {

    public static void main(String[] args) {

        Boss huhansan = new Boss();

        StockObserver tongshi1 = new StockObserver("123", huhansan);
        NBAObserver tongshi2 = new NBAObserver("234", huhansan);

        huhansan.attach(tongshi1);
        huhansan.attach(tongshi2);

        huhansan.detach(tongshi1);

        huhansan.notifyOb();
    }
}
